<template>
  <el-dialog   :visible.sync="visible" :title="title"  width="800px"  :before-close="handleClose">
    <div id="printContent" style="width: 100%;">
        <table style="width: 750px;" class="tab"  run="all">
          <th colspan="4">
            <h2>人事资料表</h2>
          </th>
          <tr>
            <td class="tdtitle">姓&nbsp;&nbsp;&nbsp;&nbsp;名：</td>
            <td class="tdcontent">{{member.name}}</td>
            <td class="tdtitle">年&nbsp;&nbsp;&nbsp;&nbsp;龄：</td>
            <td class="tdcontent">{{member.age}}</td>
          </tr>
          <tr>
            <td class="tdtitle">工作单位：</td>
            <td class="tdcontent">{{member.unit}}</td>
            <td class="tdtitle">学&nbsp;&nbsp;&nbsp;&nbsp;历：</td>
            <td class="tdcontent">{{member.education}}</td>
          </tr>
          <tr>
            <td class="tdtitle">专&nbsp;&nbsp;&nbsp;&nbsp;业：</td>
            <td class="tdcontent">{{member.major}}</td>
            <td class="tdtitle">职&nbsp;&nbsp;&nbsp;&nbsp;称：</td>
            <td class="tdcontent">{{member.position}}</td>
          </tr>
          <tr>
            <td class="tdtitle">联系方式：</td>
            <td class="tdcontent" colspan="3">{{member.mobile}}</td>

          </tr>
          <tr>
            <td class="tdtitle">工作简历：</td>
            <td class="tdcontent" colspan="3">{{member.resume}}</td>
          
          </tr>
          <tr>
            <td class="tdtitle">备&nbsp;&nbsp;&nbsp;&nbsp;注：</td>
            <td class="tdcontent" colspan="3">{{member.remark}}</td>

          </tr>
        </table>
     </div>
    <div slot="footer" class="dialog-footer">
     <el-button type="primary" v-print="'#printContent'">打&nbsp;&nbsp;印</el-button>
     </div>
  </el-dialog>
</template>

<script>
  export default {
     data() {
       return {
         visible: false,
         title:'打印',
         member:{},
         }
     },
     methods:{
       print(){
         this.$print(this.$refs.print,{});
       },
       // /** 修改按钮操作 */
       // getinfo(row) {
       //   this.reset();
       //   const id = row.id || this.ids
       //   getMember(id).then(response => {
       //     this.form = response.data;
       //     this.open = true;


       //     this.title = "修改成员基础信";
       //   });
       // },
     }
    }
</script>

<style>
   .tab  tr td { border:1px solid #000000; }
   .tdcontent{ text-align:left;width: 220px;padding-left: 10px;}
   .tdtitle{text-align: right;width: 120px;padding-right: 10px;font-weight: bold;}
   .tab  {  min-height: 40px; line-height: 40px; text-align: center; border-collapse: collapse; }
</style>
